import request from '@/lib/request.js'

export default {
	// 获取快递名称
	getShippingName(id) {
		return request.get('/store/order/delivery/'+id+'/form')
	},
	// 添加素材分类
	addAttachmentCategory(data) {
		return request.post('/system/attachment/category/create',data)
	},
	// 素材管理
	attachmentLst(cond) {
		if(!cond) return;
		return request.get('/system/attachment/lst',{},true,cond)
	},
	// 素材分类详细图片
	attachmentCategoryLst(cond) {
		if(!cond) return;
		return request.get('/system/attachment/lst',{},true,cond)
	},
	// 素材图片修改
	attachmentUpdate(id,data) {
		return request.post('/system/attachment/update/'+id,data)
	},
	// 素材图片分类列表
	attachmentCategoryFormatLst() {
		return request.get('/system/attachment/category/formatLst')
	},
	// 图片上传(上传到对应的图片分类)
	// data.file => image上传到服务器后返回来的路径
	uploadImage(id,data) {
		return request.post('/upload/image/'+id+'/file',data)
	},
	// 公告列表
	noticeLst(cond) {
		if(!cond) return;
		return request.get('/notice/lst',{},true,cond)
	},
	// 用户列表
	userLst(cond) {
		if(!cond) return;
		return request.get('/user/lst',{},true,cond)
	},
	// 商家首页统计信息
	merChantOrder() {
		return request.get('app/merchantOrder',{},true)
	},
	// 省市区地址
	cityLst() {
		return request.get('/system/city/lst')
	},
	// 添加素材分类表格
	attachmentCategoryCreateForm() {
		return request.get('/system/attachment/category/create/form')
	}
}